import React, { Component } from 'react'
import API from '../../api/api'
import Header from '../../compontent/Header/header'


class Home extends Component {
  state = {
    bookList: [],
    name: "有书网络科技"
  }
  getMyBooks = async () => {
    let data = { sex_type: 1 }
    let res = await API.getMyBook(data)
    console.log(res)
  }
  componentDidMount () {
    let res = this.getMyBooks()
    console.log(res)
  }
  render () {
    return (
      <div className="box">
        <Header></Header>
        {this.state.name}
      </div>
    )
  }
}

export default Home